home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / allmac21.arc / DATEF10.ARC / DATEF10.QM < prev    next >
Text File  |  1990-08-27  |  4KB  |  87 lines

  1. *           QEdit Macros Save File "MosDayHourMin.Ext", v1.0b
  2. *                              DATEF10.QM
  3. *
  4. * DATEF10 QEdit macros save the current file with the name either
  5. * "Mos_Day_Hour_Min.Ext" or "CurrentFileName.Mos_Day". For example,
  6. * Alt_0 saves this file as 08191025.inf and Alt_9 saves it as
  7. * e:\up\datef.819 when date and time are Sun  08-19-1990  10:25:00.
  8. * These may be useful in retrieving previous files which would have
  9. * been erased. Alt_9 added in v1.0b.
  10.  
  11. * Thanks to Jim Wright for the neat idea how to condense date and time
  12. * with his macro in QE-MEM.ZIP. Like many other macro ideas from others,
  13. * they often seem so simple once we see and understand them that we say
  14. * "why didn't I think of that" - but I didn't !
  15.  
  16.  
  17. *┌─────────────────────────────────────────────────┐
  18. *│ Alt_0 saves file as "Mos_Day_Hour_Min.Ext"      │
  19. *└─────────────────────────────────────────────────┘
  20. @0  macrobegin
  21. ***************************************** TOGGLE INSERT ON*************
  22.         insertline                      * insert test line
  23.         "a" cursorleft "a"              * insert "aa"
  24.         endline                         * if not at endline-insert is on
  25.  jtrue END:                             * if at endline   -insert is off
  26.         toggleinsert                    * toggle ON if off
  27.  END:                                   *
  28.         delline                         * delete test line
  29. ***************************************** CONDENSE DATE & TIME *******
  30.         unmarkblock                     * begin no marked block
  31.         insertline begline              * insert line
  32.         insertdate inserttime           * get date & time to condense
  33.         delltword  delltword            * delete seconds
  34.         backspace                       * delete :
  35.         cursorleft cursorleft           * keep minutes
  36.         backspace                       * delete :
  37.         cursorleft cursorleft           * keep hour
  38.         delltword  delltword            * delete spaces and year
  39.         backspace                       * delete -
  40.         cursorleft cursorleft           * keep day
  41.         backspace                       * delete -
  42.         cursorleft cursorleft           * keep month
  43.         delltword  delltword            * delete spaces & day name
  44.         endline                         * go to end of condensed number
  45.         currentfilename                 * get currentfilename
  46.         find "." return "b" return      * move to begin of extension
  47.         cursorleft markcolumn           * move off dot and mark it
  48.         find ":" return "b" return      * move to :
  49.         cursorleft deleteblock          * del all but .ext of filename
  50.         cut                             * get number.ext to scrap
  51.         writeblock paste return         * save number.ext
  52. *
  53. * 63 bytes Sat  08-18-1990  09:47:15
  54.  
  55.  
  56. *┌─────────────────────────────────────────────────────────────────┐
  57. *│Alt_9 saves the file with name "CurrentFileName.Mos_Day".        │
  58. *└─────────────────────────────────────────────────────────────────┘
  59. * Remember Jan and Nov are "1xx" and Feb and Dec are "2xx" and
  60. * ToggleInsert must be set ON.
  61. *
  62. @9  macrobegin
  63.         unmarkblock                     * begin no marked block
  64.         insertline begline              * insert line
  65.         insertdate                      * get date & time to condense
  66.         delltword  delltword            * delete spaces and year
  67.         backspace                       * delete -
  68.         cursorleft cursorleft           * keep day
  69.         backspace                       * delete -
  70.         cursorleft                      * keep month
  71.         delltword  delltword            * delete spaces & day name
  72.         begline                         *
  73.         currentfilename                 * get currentfilename
  74.         delltword                       * delete extension
  75.         cut                             * get filename.num to scrap
  76.         writeblock paste return         * save filename.num
  77. *
  78. * 24 bytes Sun  08-19-1990  10:45:08
  79.  
  80.  
  81. * Version History
  82. *
  83. *       1.0a - changed documentation
  84. *       1.0b - added Alt_9
  85.  
  86. * Tom Hogshead  Tue  08-21-1990  00:38:41
  87.